package com.qf.jie.service;

import com.qf.jie.entity.po.Commodity;
import com.qf.jie.entity.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;

public interface CommodityService extends BaseService<Commodity> {

    //上架商品, part：图片文件对象
    RespBean addCommodity(HttpServletRequest req, Part part, String name, String stock, String price);

    //根据用户id获取商品（卖家查看自己店铺的商品）
    RespBean getCommodityListByUserId(HttpServletRequest req);

    //删除商品
    RespBean deleteCommodityById(HttpServletRequest req, String id);

    //编辑商品信息
    RespBean updateCommodityById(HttpServletRequest req, String id, String name, String stock, String price);

    //更改图片
    RespBean updateCommodityImgById(HttpServletRequest req, Part part, String id);

    //商品详细信息
    RespBean CommodityDetailed(String commodity_id);

    //添加评论
    RespBean addComment(HttpServletRequest req, String commodity_id, String text);
}
